package com.sc.nft.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.AirdropGrantRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.vo.AirdropGrantEquityPropsRecordVO;
import com.sc.nft.entity.vo.AirdropGrantRecordExportListVO;
import com.sc.nft.entity.vo.AirdropGrantRecordVO;
import com.sc.nft.enums.EquityPropsTypeEnum;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * (sc_airdrop_grant_record)数据Mapper
 *
 * @author rdg
 * @since 2022-06-09 17:05:25
 * @description 由 Mybatisplus Code Generator 创建
*/
@Mapper
public interface AirdropGrantRecordMapper extends BaseMapper<AirdropGrantRecord> {

    Page<AirdropGrantRecordVO> airdropGrantRecordList(Page<Object> objectPage, @Param("nickName") String nickName,@Param("userTel") String userTel,@Param("userUuid") String userUuid, @Param("productUuid")String productUuid,@Param("firstTitle") String firstTitle, @Param("typeClassify")Integer typeClassify);

    List<AirdropGrantRecordExportListVO> airdropGrantRecordListExport(@Param("collectionName") String collectionName, @Param("startTime")Date startTime, @Param("endTime") Date endTime);

    Integer getYesterDayCountByCollectionId(@Param("collectionId") Long collectionId);

    Integer getYesterDayCountByCollectionIdByDay(@Param("collectionId") Long collectionId,@Param("day") String day);

    Integer getAllCountByCollectionId(@Param("collectionIds") List<Long> collectionId);

    Page<AirdropGrantEquityPropsRecordVO> airdropGrantEquityPropsRecordList(Page page,@Param("nickName") String nickName, @Param("userTel")String userTel, @Param("firstTitle")String firstTitle,@Param("typeClassify") Integer typeClassify);

    /**
     * 获取指定藏品空投总量
     * @param collectionId
     * @return
     */
    Integer getCountByCollectionId(@Param("collectionId") Long collectionId);

    /**
     * 获取指定藏品空投频率
     * @param collectionId
     * @return
     */
    Integer getAirdropFrequencyById(@Param("collectionId") Long collectionId);
}
